#!/usr/bin/env python
'''
DocIndexer text parser.
'''
from abstract_parser import AbstractParser
from common import EDocIndexer

class Parser(AbstractParser):

    description = 'Text document parser'
    mime_types = ['text/plain']

    def text(self,filename):
        try:
            return self.unicode(open(filename).read())
        except:
            raise EDocIndexer,'unable to read document'


if __name__ == '__main__':
    Parser.test()

# vim: ts=4 sw=4:
